package com.ruoyi.system.service.impl;

import java.util.List;
import com.ruoyi.common.core.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.SnapPicRecordMapper;
import com.ruoyi.system.domain.SnapPicRecord;
import com.ruoyi.system.service.ISnapPicRecordService;

/**
 * 随手拍记录-test2Service业务层处理
 * 
 * @author ruoyi
 * @date 2023-04-01
 */
@Service
public class SnapPicRecordServiceImpl implements ISnapPicRecordService 
{
    @Autowired
    private SnapPicRecordMapper snapPicRecordMapper;

    /**
     * 查询随手拍记录-test2
     * 
     * @param id 随手拍记录-test2主键
     * @return 随手拍记录-test2
     */
    @Override
    public SnapPicRecord selectSnapPicRecordById(Long id)
    {
        return snapPicRecordMapper.selectSnapPicRecordById(id);
    }

    /**
     * 查询随手拍记录-test2列表
     * 
     * @param snapPicRecord 随手拍记录-test2
     * @return 随手拍记录-test2
     */
    @Override
    public List<SnapPicRecord> selectSnapPicRecordList(SnapPicRecord snapPicRecord)
    {
        return snapPicRecordMapper.selectSnapPicRecordList(snapPicRecord);
    }

    /**
     * 新增随手拍记录-test2
     * 
     * @param snapPicRecord 随手拍记录-test2
     * @return 结果
     */
    @Override
    public int insertSnapPicRecord(SnapPicRecord snapPicRecord)
    {
        snapPicRecord.setCreateTime(DateUtils.getNowDate());
        return snapPicRecordMapper.insertSnapPicRecord(snapPicRecord);
    }

    /**
     * 修改随手拍记录-test2
     * 
     * @param snapPicRecord 随手拍记录-test2
     * @return 结果
     */
    @Override
    public int updateSnapPicRecord(SnapPicRecord snapPicRecord)
    {
        snapPicRecord.setUpdateTime(DateUtils.getNowDate());
        return snapPicRecordMapper.updateSnapPicRecord(snapPicRecord);
    }

    /**
     * 批量删除随手拍记录-test2
     * 
     * @param ids 需要删除的随手拍记录-test2主键
     * @return 结果
     */
    @Override
    public int deleteSnapPicRecordByIds(Long[] ids)
    {
        return snapPicRecordMapper.deleteSnapPicRecordByIds(ids);
    }

    /**
     * 删除随手拍记录-test2信息
     * 
     * @param id 随手拍记录-test2主键
     * @return 结果
     */
    @Override
    public int deleteSnapPicRecordById(Long id)
    {
        return snapPicRecordMapper.deleteSnapPicRecordById(id);
    }
}
